<template>
  <div>测试页面:{{ useStore.user }}</div>
  <div @click="changeUser">修改useStore</div>
  <van-button type="primary" @click="goLogin">按钮</van-button>
  <svg aria-hidden="true">
    <!-- #icon-文件夹名称-图片名称 -->
    <use href="#icon-login-eye-off" />
  </svg>
  <cp-icon name="login-eye-off"></cp-icon>
</template>

<script setup lang="ts">
// import { ref, reactive } from 'vue'
import { request } from '@/utils/request'
import { useUserStore } from '@/stores/modules/user'

const useStore = useUserStore()
const changeUser = () => {
  useStore.setUser({
    token: '11',
    id: '2222',
    account: '33333',
    mobile: '44444',
    avatar: '55555',
  })
  //   useStore.cg(45)
}

const goLogin = async () => {
  const res = await request.post('/login/password', {
    mobile: '13211112222',
    password: 'abc12345',
  })
  console.log('res', res)
}
</script>
<style scoped></style>
